fix(examples): use API to retrieve passcodeEncryptionCode in passphrase recovery - #9387
Merged
mohammadalfaiyazbitgo merged 2 commits intoJul 31, 2026
Conversation
mohammadalfaiyazbitgo
force-pushed
the
alfaiyaz/WCN-1331-fix-wallet-passphrase-recovery
branch
from
July 29, 2026 23:30
b9d2d86 to
3bb4837
Compare
mohammadalfaiyazbitgo
marked this pull request as ready for review
July 29, 2026 23:31
OttoAllmendinger
previously approved these changes
Jul 30, 2026
mohammadalfaiyazbitgo
force-pushed
the
alfaiyaz/WCN-1331-fix-wallet-passphrase-recovery
branch
2 times, most recently
from
July 30, 2026 15:40
96ec4c3 to
3dfbafa
Compare
Switch to authenticating via the /api/v2/user/login endpoint followed by bitgo.authenticateWithAccessToken(), instead of the legacy bitgo.authenticate() flow, to fix broken headless logins in these example scripts. Handles both the direct access_token response and the legacy ECDH-encrypted token response via bitgo.handleTokenIssuance(). WCN-1331 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…se recovery
Replace manual activation code prompt with BitGo API authentication flow.
Retrieve passcodeEncryptionCode via /wallet/{id}/passcoderecovery endpoint.
Add coin registration, wallet retrieval, and key validation step.
WCN-1331
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
mohammadalfaiyazbitgo
force-pushed
the
alfaiyaz/WCN-1331-fix-wallet-passphrase-recovery
branch
from
July 30, 2026 15:44
3dfbafa to
8b023d7
Compare
OttoAllmendinger
approved these changes
Jul 31, 2026
Contributor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
passcodeEncryptionCodevia/wallet/{id}/passcoderecoveryendpointcoin.assertIsValidKey()againstencryptedXprvTest Plan
passcodeEncryptionCodeis retrieved from API successfullyencryptedXprvTicket
WCN-1331